import { http } from "@/utils";
import { makeAutoObservable } from "mobx";

class UserStore{
    userInfo = {
        name: '你好'
    };
    constructor() {
        makeAutoObservable(this)
    }

    async getUserInfo(){
        const res = await http.get('/user/profile');
        this.userInfo = res.data;
        // console.log('this.userInfo==>',this.userInfo);
    }

    // get userInfoName(){
    //     return this.userInfo.name;
    // }

}

export default UserStore;